package com.taotao.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taotao.content.service.ContentService;
import com.taotao.pojo.TbContent;

import pojo.EasyUIDataGridResult;
import pojo.TaotaoResult;

@Controller
public class ContentController {
	//内容例表新增
	@Autowired
	private ContentService contentService;
	@RequestMapping("/content/save")
	@ResponseBody
	public TaotaoResult insertContent(TbContent tbContent) {
		return contentService.insertContent(tbContent);
	}
	//内容例表展示
	@RequestMapping("/content/query/list")
	@ResponseBody
	public EasyUIDataGridResult getcategory(long categoryId,int page, int rows) {
		EasyUIDataGridResult result = contentService.getcategory(categoryId, page, rows);
		return result;
	}
}
